import React from 'react';
import { FlatList, StyleSheet, Text, View } from 'react-native';

const styles = StyleSheet.create({
  container: {
    flex: 1,
    paddingTop: 22,
  },
  item: {
    padding: 10,
    fontSize: 18,
    height: 44,
  },
});

const MyFlatList = () => {
  return (
    <View style={styles.container}>
      <FlatList 
        data={[
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
          {key: 'Kevin_' + Math.random()},
        ]}
        renderItem={({item}) => <Text style={styles.item}>
          {item.key + '_' + Date.now()}
        </Text>}
      />
    </View>
  );
}

export default MyFlatList;